#@layout()

#define main()
#@flyColumn()
<div class="fly-home fly-panel" style="background-image: url());">
    <img src="#(user.avatar??)" alt="#(user.nickname??)">
    <!--
    <i class="iconfont icon-renzheng" title="Fly社区认证"></i>
    -->
    <h1>
        #(user.nickname??)
        #if(user.sex == 10)
        <i class="iconfont icon-nan"></i>
        #elseif(user.sex == 20)
        <i class="iconfont icon-nv"></i>
        #else

        #end
        <!--
        <i class="layui-badge fly-badge-vip">VIP3</i>
        <span style="color:#c00;">（管理员）</span>
        <span style="color:#5FB878;">（社区之光）</span>
        <span>（该号已被封）</span>
        -->
    </h1>

    <!--
    <p style="padding: 10px 0; color: #5FB878;">认证信息：layui 作者</p>
    -->

    <p class="fly-home-info">
        <!--
        <i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;">66666 飞吻</span>
        -->
        <i class="iconfont icon-shijian"></i><span>#(EJ.date(user.createtime??,"yyyy-MM-dd")) 加入</span>
        <i class="iconfont icon-chengshi"></i><span>来自#(user.city?? "火星")</span>
    </p>

    <p class="fly-home-sign">（#(user.sign)  #if(user.sign == '')这个人懒得留下签名#end）</p>

    <!--
    <div class="fly-sns" data-user="">
        <a href="javascript:;" class="layui-btn layui-btn-primary fly-imActive" data-type="addFriend">加为好友</a>
        <a href="javascript:;" class="layui-btn layui-btn-normal fly-imActive" data-type="chat">发起会话</a>
    </div>
    -->

</div>

<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md6 fly-home-jie">
            <div class="fly-panel">
                <h3 class="fly-panel-title">#(user.nickname) 最近的帖子</h3>
                <ul class="jie-row">
                    #for(x : contents.rows??)
                    <li>
                        #if(x.wonderful == 1)
                        <span class="fly-jing">精</span>
                        #end
                        <a href="/jie/detail/#(x.contentid)" class="jie-title">#(x.title)</a>
                        <i>#(x.createtime)</i>
                        <em class="layui-hide-xs">#(x.viewnum)阅/#(x.replynum)答</em>
                    </li>
                    #end
                    <!-- <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i style="font-size:14px;">没有发表任何求解</i></div> -->
                </ul>
            </div>
        </div>

        <div class="layui-col-md6 fly-home-da">
            <div class="fly-panel">
                <h3 class="fly-panel-title">#(user.nickname) 最近的回答</h3>
                <ul class="home-jieda">
                    #for(x : comments.rows??)
                    <li>
                        <p>
                            <span>#(x.createtime)</span>
                            在<a href="/jie/detail/#(x.contentid)" target="_blank">#(x.title)</a>中回答：
                        </p>
                        <div class="home-dacontent">
                            #(x.content)
                        </div>
                    </li>
                    #else
                    <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div>
                    #end
                </ul>
            </div>
        </div>
    </div>
</div>
#end

#define js()
<script>
    layui.cache.page = 'user';
    layui.cache.user = {
        username: '游客'
        ,uid: -1
        ,avatar: '../../res/images/avatar/00.jpg'
        ,experience: 83
        ,sex: '男'
    };
    layui.config({
        version: "2.0.0"
        ,base: '../../res/mods/'
    }).extend({
        fly: 'index'
    }).use('fly', function () {
        var $ = layui.jquery, fly = layui.fly;
        //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。
        $('.home-dacontent').each(function(){
            var othis = $(this), html = othis.html();
            othis.html(fly.content(html));
        });
    });
</script>
#end